<template>
  <div id="app">
<router-view></router-view>

  </div>
</template>

<script>
import {getUser} from "./api/user"
export default {
  name: 'App',
  data(){
    return{
      
    }
  },
  created(){
    getUser().then((res)=>{
     if(res.data.code==200){
      sessionStorage.setItem("userCode",res.data.data.userCode)
      sessionStorage.setItem("userName",res.data.data.userName)
      sessionStorage.setItem("userUrl",res.data.data.userUrl)
     }else{
      this.$message.error("获取用户信息失败......");
     }

    })
  },
  methods:{
    //初始化载入
    created() {
     
    },
  }
}
</script>

